home *** CD-ROM | disk | FTP | other *** search
- function getNextPage(curPage){
- leng = coRel.length;
- j=0;
- nextPage = '';
- found=false;
- for(i=0;i<leng;i++){
- if (coRel[i][0] == curPage){
- j=i;
- for(j=i;j<leng;j++){
- if (coRel[j][0] != curPage){
- nextPage=coRel[j][0];
- found=true;
- break;
- }
- }
- if (found){
- break;
- }
- }
- }
- return nextPage;
- }
-
- function getPrevPage(curPage){
- leng = coRel.length;
- j=0;
- prevPage = '';
- found=false;
- for(i=0;i<leng;i++){
- if (coRel[i][0] == curPage){
- j=i;
- for(j=i;j<leng;j--){
- if (coRel[j][0] != curPage){
- prevPage=coRel[j][0];
- found=true;
- break;
- }
- }
- if (found){
- break;
- }
- }
- }
- return prevPage;
- }
-
- function getCurrentPage(curPage){
- leng = coRel.length;
- j=0;
- currentPage = '';
- found=false;
-
- for(i=0; i<leng; i++){
- if (coRel[i][1] == curPage){
- found=true;
- currentPage = coRel[i][0];
- break;
- }
- }
- return currentPage;
- }
-
- function goPrevPage(curPage, isbn) {
- var queryString = location.search;
- pg=getPrevPage(curPage);
- if(queryString.length > 45) {
- window.document.location = (servletName+"?ACTION=0&FILE="+pg+".html&ISBN="+isbn+"&TWEISBN="+tweisbn);
- } else {
- window.document.location = (servletName+"?ACTION=0&FILE="+pg+".html&ISBN="+isbn);
- }
- }
-
- function goPrevTwePage(curPage,isbn) {
- pg=getPrevPage(curPage);
- window.document.location = (servletName+"?ACTION=0&FILE="+pg+".html&UT=1&ISBN="+isbn);
- }
-
- function goNextPage(curPage,isbn) {
- var queryString = location.search;
- pg1=getNextPage(curPage);
- if(queryString.length > 45) {
- window.document.location = (servletName+"?ACTION=0&FILE="+pg1+".html&ISBN="+isbn+"&TWEISBN="+tweisbn);
- } else {
- window.document.location = (servletName+"?ACTION=0&FILE="+pg1+".html&ISBN="+isbn);
- }
- }
-
- function goNextTwePage(curPage,isbn) {
- pg1=getNextPage(curPage);
- window.document.location = (servletName+"?ACTION=0&FILE="+pg1+".html&UT=1&ISBN="+isbn);
- }
-
- function goToPage(isbn){
- //alert("test");
- txtvalue=document.forms['gotoPage'].PAGENUM.value;
- pg = getCurrentPage(txtvalue);
- var width = getWidth( 350 );
- var height = 170;
- var features = "scrollbars='no',top=0,left=0,width=" + width + ",height=" + height;
-
- //alert("Page number="+pg);
- url = '../../../../generic/html/noSuchPage.html?page='+txtvalue;
- if (pg == ''){
- window.open(url, "errorPage", features, true).focus();
- }
- else{
- window.document.location = (servletName+"?ACTION=0&FILE="+pg + ".html&ISBN="+isbn);
- }
- }
-
- function goToLinkPage(isbn,pg) {
- pg = getCurrentPage(pg);
- var width = getWidth( 320 );
- var height = 170;
- var features = "scrollbars='no',top=0,left=0,width=" + width + ",height=" + height;
-
- url = '../../../../generic/html/noSuchPage.html?page='+pg;
- if (pg == ''){
- window.open(url, "errorPage", features, true).focus();
- }
- else{
- window.document.location = (servletName+"?ACTION=0&FILE="+pg + ".html&ISBN="+isbn);
- }
-
- }
-
- function goToLinkPageToParent(isbn,pg) {
- opener.location.href = servletName+"?ACTION=0&FILE="+pg + ".html&ISBN="+isbn;
- window.close();
- }
-
-
- function goToTwePage(isbn) {
- //alert("test");
- txtvalue=document.forms['gotoPage'].PAGENUM.value;
- pg = getCurrentPage(txtvalue);
- var features = "scrollbars='no',top=0,left=0,width=350,height=170";
-
- url = '../../../../generic/html/noSuchPage.html';
- if (pg == ''){
- window.open(url, "errorPage", features, true).focus();
- }
- else{
- window.document.location = (servletName+"?ACTION=0&FILE="+pg + ".html&ISBN="+isbn);
- }
- }
-
- function referToPage(txtvalue, isbn) {
- pg = getCurrentPage(txtvalue);
- var features = "scrollbars='no',top=0,left=0,width=350,height=170";
-
- url = '../../../../generic/html/noSuchPage.html?page='+txtvalue;
- if (pg == ''){
- window.open(url, "errorPage", features, true).focus();
- }
- else{
- window.document.location = (servletName+"?ACTION=0&FILE="+pg + ".html&ISBN="+isbn);
- }
- }
-
-
- function loadParentPage(isbn, page ) {
- pg = getCurrentPage(page);
- window.opener.location.href = servletName+"?ACTION=0&FILE=" + pg + ".html&ISBN="+isbn;
- window.close();
- }